%{
#include <stdio.h>
#include <stdlib.h>
extern int yylex();
extern void yyerror(char *);
%}

%union {
int int_token;
}

%token <int_token> TYPE ID SEMICOLON COMMA

%start decl_list

%%


decl_list: TYPE ID opt_id_list SEMICOLON {printf("parsed a declaration list\n"); exit(0);}
opt_id_list: COMMA ID opt_id_list {printf("parsed an ID list\n");} | /*empty*/ {printf("parsed epsilon\n");}

